package com.algs1_3;

import edu.princeton.cs.algs4.StdIn;
import edu.princeton.cs.algs4.StdOut;

import java.util.Stack;

/**
 * 整数逆序排列 Stack用例
 */
public class Reverse {
    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        while (!StdIn.isEmpty()){
            stack.push(StdIn.readInt());
        }
        for(int i : stack){
            System.out.println(i);
        }
    }
}
